Software programs executing on a computer system generally communicate with audio hardware devices (e.g., a microphone) of the system, through device driver programs associated with the audio devices (and that may be part of the operating system on which the software programs are executing). For example, a software program can access audio data generated by a microphone by interacting with the device driver program of the microphone. A ring buffer is used to temporarily store audio data that is being communicated between the software program and the device driver program. The device driver program writes audio data into the ring buffer as audio data is generated by the hardware device (e.g., microphone). The software program estimates when a pre-arranged quantum of audio data will be available in the ring buffer and consumes audio data from the ring buffer when it determines that the quantum of audio data is available.
Some computer systems include a dedicated microphone path that is always recording, and thus continuously writing audio data into the ring buffer. The dedicated microphone path is useful for detecting voice commands from a user without the user having to manually activate a voice command application or even without having to “wake up” the device. For example, the “Hey Siri” feature available in the IPHONE® and IPAD® devices leverage the dedicated microphone path to detect voice commands from the user even while parts of the device are in sleep mode or otherwise deactivated.